<?php
class Optlog extends CI_Model {
	const ADDUSER=4;
	const MODUSER=5;
	const DELUSER=6;
	const ADDROLE=7;
	const MODROLE=8;
	const DELROLE=9;
	const ADDDEPT=19;
	const MODDEPT=20;
	const DELDEPT=21;


	function write($tbid,$content,int $type){
		$data=['tbID'=>$tbid,'content'=>$content,'type'=>$type,'uid'=>UID,'ip'=>$this->input->ip_address()];
		return $this->db->insert('optLog',$data);
	}
}
